package edu.sctu.practice.class01.xiangkun.test02;

/**
 * Created by xiangkun on 2015/10/15.
 */
public class Vehicle {

    private int speed = 3;
    private int size = 6;

    public int getSpeed() {
        return speed;
    }

    public int getSize() {
        return size;
    }

    public int instance = 0;
    public void move(){
         instance = speed * size;
        System.out.println("工具移动的距离：" + instance + "米");
    }

    public void setSize( int size){
         this.size = size;
        System.out.println("工具的体积："+size + "立方米");
    }

    public void setSpeed(int speed){
         this.speed = speed;
        System.out.println("工具的速度："+ speed + "米/秒");
    }

    public void speedUp(int i){
        int upspeed = speed + i;
        System.out.println("工具加速后的速度：" + upspeed);
    }

    public void speedDown(int t){
        int downspeed = speed - t;
        System.out.println("工具减速后的速度：" + downspeed);
    }
}
